import https from "@/utils/http/http2";

export const saveProduct = data => {
  return https({
    method: "post",
    url: `product`,
    data
  });
};

export const selectProduct = params => {
  return https({
    method: "get",
    url: `product`,
    params
  });
};

export const delProductById = id => {
  return https({
    method: "DELETE",
    url: `product/${id}`
  });
};

export const updateProductById = data => {
  return https({
    method: "put",
    url: `product`,
    data
  });
};
